import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Index from '@/views/Index'
import SafetyProductionManagement from '@/views/companyManage/SafetyProductionManagement'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      component: Login,
      name: '',
      hidden: true
    },{
      path: '/',
      component: Home,
      redirect: '/index',
      name: '',
      hidden: true
    }, {
      path: '/',
      component: Home,
      leaf: true, //只有一个节点
      // iconCls: 'fa fa-home',
      children: [
        { path: '/index', component: Index, name: '首页' },
        {path: '/safetyProductionManagement', component: SafetyProductionManagement, name: '安全生产管理'}
      ]
    }
  ]
})
